<?php

namespace Admin\Controller;

class AnnexController extends CommonController
{
    // 问答-附件图片
    public function lists()
    {
        $lists = D("QuestionImg")->get_list('', true);
//        dump($lists);
        $this->assign('lists', $lists);
        $this->display();
    }

    // 问答-附件图片-删除
    public function delete()
    {
        $ids = I('request.id');
        if (!empty($ids)) {
            $img = D("QuestionImg");
            $s   = $img->del_img($ids);
            $this->success("成功删除{$s}条数据");
        } else {
            $this->error('请选择要删除的信息！');
        }
    }
}